package com.scau.wrongtitle.domin;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import java.util.Date;

@Data
@EntityListeners(AuditingEntityListener.class)
@MappedSuperclass
public abstract class BaseEntity {
    @CreatedDate
    @Column(name = "create_at")
    protected Date createAt;
    @LastModifiedDate
    @Column(name = "update_at")
    protected Date updateAt;

    @Column(name = "create_by")
    protected Integer createBy;
    @Column(name = "update_by")
    protected Integer updateBy;

    @Column(name = "is_del")
    protected boolean isDel;
}
